// src/utils/storage.js
export default {
    setToken(token) {
        localStorage.setItem('auth_token', token);
    },
    getToken() {
        return localStorage.getItem('auth_token');
    },
    removeToken() {
        localStorage.removeItem('auth_token');
    },
    setUser(user) {
        localStorage.setItem('user_info', JSON.stringify(user));
    },
    getUser() {
        const user = localStorage.getItem('user_info');
        return user ? JSON.parse(user) : null;
    },
    removeUser() {
        localStorage.removeItem('user_info');
    }
};